Maths Quiz - Solutions

Adok/Hugi

Level "Easy":

A sniper is seeing three tins marked with A, B, C in front of him. When he shoots, the chance that he hits any tin is 60%; the chance that he hits a particular tin, however, is only 20%. What's the chance that, after shooting three times, he has hit tins A, B, C in exactly this order? What's the chance that, after shooting three times, he has hit no tin at all? And how much is the latter possibility more likely than the first?

Solution:

The chance that he hits tins A, B, C in this order is 20%^3 = 0.8%. The chance that he hits no tin at all is (100%-60%)^3 = 6.4%. Therefore, it is 6.4% / 0.8% = 8 times more likely that he hits no tin at all than that he hits the three tins in the given order.

Level "Medium":

What's the chance that two particular persons were born on the same day? Note that this is not about a particular day, but about any day in the year. You must assume that a year consists of 366 days.

Solution:

Let person A be born on day D. No matter what D is, the probability that person B was born on the same day is 1/366. Now fix day D to be the 1st day, 2nd, ..., 366th day. We get:

P = 1/366 * 1/366 + ... + 1/366 * 1/366 [366 times] = 366 * (1/366)^2 = 1/366.

(Boiled Brain)

Level "Hard":

A mad coder has written a perfect random numbers generator which works with the data-type unsigned char (i.e. it returns numbers in the range of 0 to 255). The special feature of the function is that every time you call it, the output value is at least as large as the previous one. The coder runs his function 3 times and adds the returned values to a long int variable in order to prevent overflow errors. How many possibilities are there to get a total sum of 30?

Solution:

Since each time the value has to be greater than the previous time, there are only the following possibilities:

0 + 0 + 30
0 + 1 + 29
0 + 2 + 28
0 + 3 + 27
0 + 4 + 26
0 + 5 + 25
0 + 6 + 24
0 + 7 + 23
0 + 8 + 22
0 + 9 + 21
0 + 10 + 20
0 + 11 + 19
0 + 12 + 18
0 + 13 + 17
0 + 14 + 16
0 + 15 + 15

(16 possibilities)

1 + 1 + 28
1 + 2 + 27
1 + 3 + 26
1 + 4 + 25
1 + 5 + 24
1 + 6 + 23
1 + 7 + 22
1 + 8 + 21
1 + 9 + 20
1 + 10 + 19
1 + 11 + 18
1 + 12 + 17
1 + 13 + 16
1 + 14 + 15

(14 possibilities)

2 + 2 + 26
2 + 3 + 25
2 + 4 + 24
2 + 5 + 23
2 + 6 + 22
2 + 7 + 21
2 + 8 + 20
2 + 9 + 19
2 + 10 + 18
2 + 11 + 17
2 + 12 + 16
2 + 13 + 15
2 + 14 + 14

(13 possibilities)

3 + 3 + 24
3 + 4 + 23
3 + 5 + 22
3 + 6 + 21
3 + 7 + 20
3 + 8 + 19
3 + 9 + 18
3 + 10 + 17
3 + 11 + 16
3 + 12 + 15
3 + 13 + 14

(11 possibilities)

4 + 4 + 22
4 + 5 + 21
4 + 6 + 20
4 + 7 + 19
4 + 8 + 18
4 + 9 + 17
4 + 10 + 16
4 + 11 + 15
4 + 12 + 14
4 + 13 + 13

(10 possibilities)

5 + 5 + 20
5 + 6 + 19
5 + 7 + 18
5 + 8 + 17
5 + 9 + 16
5 + 10 + 15
5 + 11 + 14
5 + 12 + 13

(8 possibilities)

6 + 6 + 18
6 + 7 + 17
6 + 8 + 16
6 + 9 + 15
6 + 10 + 14
6 + 11 + 13
6 + 12 + 12

(7 possibilities)

7 + 7 + 16
7 + 8 + 15
7 + 9 + 14
7 + 10 + 13
7 + 11 + 12

(5 possibilities)

8 + 8 + 14
8 + 9 + 13
8 + 10 + 12
8 + 11 + 11

(4 possibilities)

9 + 9 + 12
9 + 10 + 11

(2 possibilities)

10 + 10 + 10

(1 possibility)

In short: The number of possibilities is 16 + 14 + 13 + 11 + 10 + 8 + 7 + 5 + 4 + 2 + 1 = Sum(1 to 16) - 3 * Sum(1 to 5) = (16 + 1) * 16 / 2 - 3 * (5 + 1) * 5 / 2 = 91.

The correct solutions have been found by Bonz, Boiled Brain, Tor G. J. Myklebust. Congratulations!

Adok/Hugi